<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title>参保地变更</title>
		<link rel="stylesheet" href="css/cb.css">

		<!-- 必须先引入vue，  后使用element-ui -->
		<script type="text/javascript" src="/admin/js-css/js/vue.min.js"></script>

		<script type="text/javascript" src="/admin/js-css/js/jquery-1.7.2.min.js"></script>
		<script type="text/javascript" src="/admin/js-css/js/mx1.0.js?v=1.1.1"></script>
		<script src="js/print.js" type="text/javascript" charset="utf-8"></script>

	</head>
	<body>
		<div id="app">
			<div class="box">
				<div class="item" v-for="(item,index) in 4">
					<div class="add">
						
						<span class="input" >{{formData["data"+item].cbd}}</span>
					</div>
					<div class="yxtime">
						<span class="year">{{formData["data"+item].sxsj.split("-")[0]}}</span>
						<span class="month">{{formData["data"+item].sxsj.split("-")[1]}}</span>
						<span class="date">{{formData["data"+item].sxsj.split("-")[2]}}</span>
					</div>
					<div class="person">
						
						<span class="input">{{formData["data"+item].jbr}}</span>
					</div>
					<div class="time">
						
						<span class="year">{{formData["data"+item].rq.split("-")[0]}}</span>
						<span class="month">{{formData["data"+item].rq.split("-")[1]}}</span>
						<span class="date">{{formData["data"+item].rq.split("-")[2]}}</span>
					</div>
				</div>
			</div>
		</div>
		
	</body>

	<script>
		var vm = new Vue({
			el: "#app",
			data: {
				parmsData:{},
				formData:{"data1":{},"data2":{},"data3":{},"data4":{}},
			},
			created(){
				this.parmsData = getParams();
				this.loadData();
			},
			methods: {
				hdprint() {
					window.print();
				},
				//加载数据
				async loadData(){
					for(let a=1;a<=4;a++){
						this.formData["data"+a].sxsj = "";
						this.formData["data"+a].rq = "";
					}
					const res = await listAdmin(getTableId("1078"),"dyym",{"ddbh":this.parmsData.id});
					const datalist = res.data;
					for(let a=0;a<datalist.length;a++){
						this.formData["data"+datalist[a].dyym] = datalist[a];
					}

				}
			}

		})
	</script>
</html>
